package com.athuahua.spzx.controller.cargo;

import com.athuahua.spzx.entity.Product;
import com.athuahua.spzx.entity.ProductUnit;
import com.athuahua.spzx.service.ProductUnitService;
import com.athuahua.spzx.utils.Result;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: huahua
 * @Date: 2024/8/2 0002
 * @Time: 15:07
 * @Description:
 */
@RestController
@RequestMapping("admin/product/productUnit")
@Tag(name = "计量单位接口")
@Slf4j
public class ProductUnitController {
    @Resource
    private ProductUnitService productUnitService;

    @GetMapping("findAll")
    public Result<List<ProductUnit>> findAll() {
        return Result.success(productUnitService.list());
    }







}
